/**
 * Created by SYT on 2016-07-31.
 */
var Box=document.getElementById("Box");
var loginBox=document.getElementById("loginBox");
var zhuceBox=document.getElementById("zhuceBox");
function login(){
    Box.style.visibility="visible";
    loginBox.style.visibility="visible"
}
function switchLogin(){
    Box.style.visibility="visible";
    zhuceBox.style.visibility="hidden";
    loginBox.style.visibility="visible"
}
function switchZhuce(){
    Box.style.visibility="visible";
    loginBox.style.visibility="hidden";
    zhuceBox.style.visibility="visible"
}
function zhuce(){
    Box.style.visibility="visible";
    zhuceBox.style.visibility="visible"
}
function close1(){
    console.log("123")
    Box.style.visibility="hidden";
    loginBox.style.visibility="hidden";
    zhuceBox.style.visibility="hidden"
}
//doubleyong add 2020/4/27 start
$(function(){
    $("#loginBtn").click(function(){
        // 先进行判断，用户名及密码不能为空
        if($("#loginUser").val().trim().length=0){
            //修改文本后面对应的提示信息
        }
        if($("#loginPwd").val().trim().length==0){
            //修改文本后面对应的提示信息

        }
        if($("#loginUser").val().trim().length!=0 &&$("#loginPwd").val().trim().length!=0){
            var param = $("#LoginForm").serialize();
            console.log(param);

            $.post("/login",param,function(data){
                if(data.code==200){
                    alert(data.message);
                    location.reload();
                }
            })
        }

    });
})

//doubleyong add 2020/4/27 end